import axios from './axios'

// 客户通过rfid进货
export function rfidInput(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/rfidInput',
    data
  })
}

// 减标
export function inSubtract(data) {
  return axios({
    method: 'put',
    url: '/customerInputTotal/subtract',
    data
  })
}

// 清空
export function inEmpty(params) {
  return axios({
    method: 'delete',
    url: '/customerInputTotal/empty',
    params
  })
}

// 确认进货的数据
export function affirmInput(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/affirmInput',
    data
  })
}

// 收货
export function receipt(params) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/receipt',
    params
  })
}

// 获取客进前五条数据
export function inputSequenceQuery(params) {
  return axios({
    url: '/customerInputTotal/inputSequenceQuery',
    params
  })
}

// 获得出货金额下限所需数据（历史出货金、历史付款金、出货金额下限）
export function getOutMoneyLower(params) {
  return axios({
    url: '/customerInputTotal/getOutMoneyLower',
    params
  })
}

// 客户进货（新建资料）继续录入
export function inputByKindsNumberContinue(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/inputByKindsNumberContinue',
    data
  })
}

// 确认后补单
export function patchByAffirm(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/patchByAffirm',
    data
  })
}

// 客户进货(新建资料) 保存
export function inputByKindsNumber(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/inputByKindsNumber',
    data
  })
}

// 改单编辑查询（货号，客进序号）
export function updateReceipt(params) {
  return axios({
    url: '/customerInputTotal/getUpdateReceiptByKindsNumberAndInputSequence',
    params
  })
}

// 改单
export function affirmUpdateReceipt(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/affirmUpdateReceipt',
    data
  })
}

// 确定后修改数据
export function updateByAffirm(data) {
  return axios({
    method: 'put',
    url: '/customerInputTotal/updateByAffirm',
    data
  })
}

// 客户进货查询（多条件）
export function getInputInquire(params) {
  return axios({
    url: '/customerInputTotal/getInputInquire',
    params
  })
}

// 按序号查询客进详情
export function getInfoByInputSequence(params) {
  return axios({
    url: '/customerInputTotal/getInfoByInputSequence',
    params
  })
}

// 查询调整过的售价
export function getAdjustmentSellingPrice() {
  return axios({
    url: '/customerInputTotal/getAdjustmentSellingPrice'
  })
}

// 审核
export function checkYse(data) {
  return axios({
    method: 'put',
    url: '/customerInputTotal/checkYse',
    data
  })
}

// 反审
export function checkNo(data) {
  return axios({
    method: 'put',
    url: '/customerInputTotal/checkNo',
    data
  })
}

// 整退
export function allOut(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/allOut',
    data
  })
}

// 整销
export function allSell(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/allSell',
    data
  })
}

// 删除进货数据  （客户编号，客进序号，是否全选需封装进数据）
export function deleteInput(data) {
  return axios({
    method: 'delete',
    url: '/customerInputTotal/deleteInput',
    data
  })
}

// 确认后删除数据
export function deleteInputAffirm(data) {
  return axios({
    method: 'delete',
    url: '/customerInputTotal/deleteByAffirm',
    data
  })
}

// 获取最早客进日期   type（0：型号 1：货号 ）
export function topInputTime(params) {
  return axios({
    url: '/customerInputTotal/topInputTime',
    params
  })
}

// 根据序号查询对应的rfid对象  类型:1:客进 2:客退
export function RfidList(params) {
  return axios({
    url: '/customerInputTotal/sequenceRfidList',
    params
  })
}

export function importCustomerInput(data) {
  return axios({
    method: 'post',
    url: '/customerInputTotal/importCustomerInput',
    data
  })
}
